<?php

function conectar_solo_lectura(){
    $dbname='data/em_bd.sqlite';
    

    if(!class_exists('SQLite3'))
      die("SQLite 3 NOT supported.");

    return $base=new SQLite3($dbname, SQLITE3_OPEN_READONLY);
} 

function conectar_lectura_escritura(){
    $dbname='data/em_bd.sqlite';
    

    if(!class_exists('SQLite3'))
      die("SQLite 3 NOT supported.");

    return new SQLite3($dbname, 0666);
}

function conectar_para_css(){
    $dbname='../data/em_bd.sqlite';
    if(!class_exists('SQLite3'))
      die("SQLite 3 NOT supported.");

    return new SQLite3($dbname, SQLITE3_OPEN_READONLY);
}
?>
